package com.dews.information.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dews.common.converter.MyFieldTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;


/**
 * 专业课程管理对象 dews_subject_course
 *
 * @author qingfeng
 * @date 2024-12-08
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ToString
@TableName(value = "dews_subject_course", autoResultMap = true)
public class SubjectCourse {

    private static final long serialVersionUID = 1L;

    /** 主键ID */
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;

    /** 部门学院Id */
    @TableField("dep_id")
    private Long depId;

    /** 专业id */
    @TableField("subject_id")
    private Integer subjectId;

    @TableField("course_code")
    private String courseCode;

    /** 课程名称 */
    @TableField("course_name")
    private String courseName;

    /** 课程介绍 */
    @TableField("content")
    private String content;

    /** 课程教师 */
    @TableField(value = "course_teacher", typeHandler = MyFieldTypeHandler.class)
    private List<Integer> courseTeacher;

    /** 是否启用：0-未启用  1-启用 */
    @TableField("is_enable")
    private Integer isEnable;

    /** 创建时间 */
    @TableField("create_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    /** 修改时间 */
    @TableField("update_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

}
